<% if @routes.blank? %>

  <p class="error">There are no routes added yet.</p>

<% else %>

  <table>
    <thead>
      <tr>
        <th>Name</th>
	<th>Description</th>
        <th class="last"></th>
      </tr>
    </thead>
    <tbody>
      <% @routes.each do |route| %>
        <tr>
          <td><%= link_to h(route.name), route %></td>
	  <td><%= h(route.description) %></td>
          <td class="last">
            <%= link_to(image_tag('icons/pencil.png', :alt => 'Edit'), edit_route_path(route)) %>
            <%= link_to(image_tag('icons/cross.png', :alt => 'Delete'), route, :confirm => 'Are you sure?', :method => :delete) %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>

<% end %>

<p><%= link_to 'Add New Route', new_route_path %></p>
<p><%= link_to 'Change Default Route Order', defaultroutes_path %></p>
